home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
tcoop10a.zip
/
DOC.ZIP
/
EFFECT.DOC
< prev
next >
Wrap
Text File
|
1991-11-20
|
5KB
|
116 lines
EFFECT.DOC 11/20/91 Copyright (c) 1991 by James S. Clark
==========================================================================
EFFECT
Effect Class
--------------------------------------------------------------------------
Class Name Effect
Superclass Play
Category Sound
Other classes referenced <none>
Other catagories referenced <none>
Used by many
Inherited by <none>
Maturity Index low
Declaration Effect fx;
Instance Variables
<none>
Instance Methods
Effect () { };
~Effect () { };
void generator(int wave, int time,
int hifreq, int lofreq,
int step, int dur);
void alarm (int time)
void bomb (int time)
void computer(int time)
void explode (int time)
void explode2(int time)
void laser (int time)
void phone (int time)
void police (int time)
void raygun (int time)
void tinkle (int time)
--------------------------------------------------------------------------
GENERAL DESCRIPTION
The Effect Class is used to create a number of sound effects using the
Sound Class, and produces the tones on the internal speaker. A general
purpose frequency modulated waveform generator method is called to load
sound buffer. Several waveforms are provided: square, triangle, ramp up,
ramp dowm, and random.
A group of pro-programmed special effects are also included, that
demonstrate the versatility of the effect generator.
Note: The Effects Class is derived from the Play Class, and contains
all the functionality of Play! There is no need to use the Play Class
when using Effects. Do NOT create more than one instance of the Play
or Effect Class at any given time, or it may cause system failure.
--------------------------------------------------------------------------
VARIABLES
<none>
--------------------------------------------------------------------------
METHODS
Effect () { };
Creates and initializes the sound effects generator.
~Effect () { };
Closes down the sound effects generator.
void generator(int wave, int time, int hifreq, int lofreq,
int step, int dur);
Generates a series of tones for the given length of time,
between the hi and lo frequencies. Step is used to
increment or decrement the frequency. Duration is the
tone length.
void alarm (int time)
The sound of an alarm clock. The time is given in
milliseconds (1/100s of a second).
void bomb (int time)
The sound of a bomb dropping.
void computer(int time)
The sound of a computer thinking.
void explode (int time)
A low rumbling explosion.
void explode2(int time)
A high frenzied explosion.
void laser (int time)
The sound of a laser generator.
void phone (int time)
The sound of a phone bell.
void police (int time)
The sound of a police siren.
void raygun (int time)
The sound of a martian raygun.
void tinkle (int time)
The sound of high-pitched tinkling.
--------------------------------------------------------------------------
FREQUENCY MODULATING WAVE FORMS
SQUARE produces a square wave, for hilo and pulsed sounds
TRIANGLE produces a triangle wave, for sirens and warbles.
RAMPUP produces a sawtooth up wave, for droplets, rayguns.
RAMPDOWN produces a sawtooth down wave, for bombs, falling.
RANDOM produces a random waveform, for explosions, computer.
--------------------------------------------------------------------------
EFFECT.DOC Copyright (c) 1991 by James S. Clark
==========================================================================